package com.qf.day03.loop;

/**
 * 案例
 */
public class Demo01 {
    public static void main(String[] args) {
        int sum = 0;
        for (int i = 1; i <= 100; i++) {
            sum = sum + i;
            if (sum > 888) {
                System.out.println(i);
                //退出循环
                break;
            }
        }
        System.out.println("sum"+sum);
    }
}
